package com.fh;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @author： qiujunda
 * @date： 2020/12/16 9:44
 */
@SpringBootApplication
@EnableDiscoveryClient
public class UcasApplication {
    public static void main(String[] args) {
        SpringApplication.run(UcasApplication.class, args);
    }

    @RestController
    public class TestController {

        @RequestMapping(value = "/ucas1/{str}", method = RequestMethod.GET)
        public String echo1(@PathVariable String str) {
            System.out.println("echo1-----------------------"+str);
            return "echo1"+str;
        }
        @RequestMapping(value = "/ucas2/{str}", method = RequestMethod.GET)
        public String echo2(@PathVariable String str) {
            System.out.println("echo2-----------------------"+str);
            return "echo2"+str;
        }
        @RequestMapping(value = "/fh-ucas/{str}", method = RequestMethod.GET)
        public String echo3(@PathVariable String str) {
            System.out.println("echo1-----------------------"+str);
            return "echo1"+str;
        }
    }

//
//    public static void main(String[] args){
//        Person man=new Man();
//        man.say();
//    }

}
//class Person{
//    public String name;
//    public Person(){
//        name="person";
//        System.out.println("init Person");
//    }
//    public void say(){
//        System.out.println("person say name:"+name);
//    }
//}
//class Man extends Person{
//    public String name;
//    public Man(){
//        name="man";
//        System.out.println("init Man");
//    }
//    public void say(){
//        System.out.println("man say name:"+name);
//    }
//
//}
